<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>供应商管理</title>
    <!-- 引入jquery -->
    <script src="/jquery2.2.3/jquery.min.js"></script>
    <!-- 引入layui -->
    <link rel="stylesheet" href="/layui-2.8.17/css/layui.css">
    <script src="/layui-2.8.17/layui.js"></script>
    <!-- 引入bootstrap -->
    <link href="/bootstrap-3.4.1/css/bootstrap.css" rel="stylesheet">
    <script src="../bootstrap-3.4.1/js/bootstrap.js"></script>
    <!--引入bootstra-table-->
    <script src="/bootstrap-table-1.11.1/bootstrap-table.js"></script>
    <link href="/bootstrap-table-1.11.1/bootstrap-table.css" rel="stylesheet">
    <!-- 引入bootstra-table中文语言包 -->
    <script src="/bootstrap-table-1.11.1/locale/bootstrap-table-zh-CN.js"></script>
</head>
<body>
<div class="container-fluid">
    <div class="top-toolbar" id="top-toolbar">
        <div class="form-group">
            <label for="search-supplierName" class="col-sm-2 control-label">商品名称</label>
            <div class="col-sm-5">
                <input type="text" id="search-supplierName" name="search-supplierName" class="form-control well"/>
            </div>
        </div>
        <button class="btn btn-primary" id="searchSupplier" onclick="searchSupplierOnClick()">查询</button>
        <button type="button" id="reset" class="btn btn-default">重置</button>
        <button class="btn btn-info" data-toggle="modal" data-target="#addModal">新增</button>
    </div>
    <br>
    <!--  定义添加模态框触发器，此处为按钮触发  -->
    <div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <!--  定义模态框，过渡效果为淡入，id为myModal,tabindex=-1可以禁用使用tab切换，aria-labelledby用于引用模态框的标题，aria-hidden=true保持模态框在触发前窗口不可见  -->
        <div class="modal-dialog">
            <!--  显示模态框对话框模型（若不写下一个div则没有颜色）  -->
            <div class="modal-content">
                <!--  显示模态框白色背景，所有内容都写在这个div里面  -->

                <div class="btn-info modal-header">
                    <!--  模态框标题  -->
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <!--  关闭按钮  -->
                    <h4>新增供应商</h4>
                    <!--  标题内容  -->
                </div>

                <div class="modal-body">
                    <!--  模态框内容，我在此处添加一个表单 -->
                    <div class="form-group">
                        <label for="add-supplierName" class="col-sm-2 control-label">供应商名称</label>
                        <div class="col-sm-9">
                            <input type="text" id="add-supplierName" name="add-supplierName" class="form-control well"
                                   placeholder="请输入供应商名称"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="add-note" class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-9">
                            <input type="text" id="add-note" name="add-note" class="form-control well"
                                   placeholder="请输入备注"/>
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <!--  模态框底部样式，一般是提交或者确定按钮 -->
                    <button type="button" id="addSupplier" class="btn btn-info">新增</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>

            </div><!-- /.modal-content -->
        </div>
    </div> <!-- /#addModal -->

    <!--  定义修改模态框触发器，此处为按钮触发  -->
    <div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">
        <!--  定义模态框，过渡效果为淡入，id为myModal,tabindex=-1可以禁用使用tab切换，aria-labelledby用于引用模态框的标题，aria-hidden=true保持模态框在触发前窗口不可见  -->
        <div class="modal-dialog">
            <!--  显示模态框对话框模型（若不写下一个div则没有颜色）  -->
            <div class="modal-content">
                <!--  显示模态框白色背景，所有内容都写在这个div里面  -->

                <div class="btn-info modal-header">
                    <!--  模态框标题  -->
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <!--  关闭按钮  -->
                    <h4>修改供应商</h4>
                    <!--  标题内容  -->
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label for="update-id" class="col-sm-2 control-label">供应商id</label>
                        <div class="col-sm-9">
                            <input type="text" id="update-id" name="update-id" class="form-control well" disabled/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="update-supplierName" class="col-sm-2 control-label">供应商名称</label>
                        <div class="col-sm-9">
                            <input type="text" id="update-supplierName" name="update-supplierName" class="form-control well"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="update-note" class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-9">
                            <input type="text" id="update-note" name="update-note" class="form-control well"/>
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <!--  模态框底部样式，一般是提交或者确定按钮 -->
                    <button type="button" id="updateSupplier" class="btn btn-info">修改</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>

            </div><!-- /.modal-content -->
        </div>
    </div> <!-- /#updateModal -->

    <!--  定义删除模态框触发器，此处为按钮触发  -->
    <div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">
        <!--  定义模态框，过渡效果为淡入，id为myModal,tabindex=-1可以禁用使用tab切换，aria-labelledby用于引用模态框的标题，aria-hidden=true保持模态框在触发前窗口不可见  -->
        <div class="modal-dialog">
            <!--  显示模态框对话框模型（若不写下一个div则没有颜色）  -->
            <div class="modal-content">
                <!--  显示模态框白色背景，所有内容都写在这个div里面  -->

                <div class="btn-info modal-header">
                    <!--  模态框标题  -->
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <!--  关闭按钮  -->
                    <h4>删除供应商</h4>
                    <!--  标题内容  -->
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label for="delete-id" class="col-sm-2 control-label">供应商id</label>
                        <div class="col-sm-9">
                            <input type="text" id="delete-id" name="delete-id" class="form-control well" disabled/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="delete-supplierName" class="col-sm-2 control-label">供应商名称</label>
                        <div class="col-sm-9">
                            <input type="text" id="delete-supplierName" name="delete-supplierName" class="form-control well"
                                   disabled/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="delete-note" class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-9">
                            <input type="text" id="delete-note" name="delete-note" class="form-control well" disabled/>
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <!--  模态框底部样式，一般是提交或者确定按钮 -->
                    <button type="button" id="deleteSupplier" class="btn btn-danger">删除</button>
                    <button type="button" class="btn btn-info" data-dismiss="modal">取消</button>
                </div>

            </div><!-- /.modal-content -->
        </div>
    </div> <!-- /#deleteModal -->

    <table class="table table-bordered" id="supplier"></table>
</div>

<script src="/js/supplier.js"></script>
</body>
</html>